function Button(mc) {
    this.mc = mc;

    let pt = new lib.pt();
    exportRoot.main.addChild(pt);

    // 为this添加事件机制
    createjs.EventDispatcher.initialize(this);

    mc.addEventListener('mousedown', (e)=>{
        // console.log('mousedown')
        mc.gotoAndPlay("down");
        e.stopPropagation();
    });
    mc.addEventListener('pressmove', (e)=>{
        // console.log('pressmove')
        e.stopPropagation();
    });
    mc.addEventListener('pressup', (e)=>{
        console.log('pressup', e)
        mc.gotoAndPlay("up");

        let pt = mc.localToGlobal(mc.rect.x, mc.rect.y);
        let pt_ = mc.localToGlobal(mc.rect.x+mc.rect.getTransformedBounds().width, mc.rect.y+mc.rect.getTransformedBounds().height);

        let left = e.stageX;
        let top = e.stageY;

        if(left>pt.x&&left<pt_.x&&top>pt.y&&top<pt_.y) {
            setTimeout(()=>{
                var event = new Event("click");
                event.startX = left;
                event.startY = top;
                this.dispatchEvent(event);
            }, 300)
        }

        e.stopPropagation();
    });

    return this;
}
